package cn.pengyinrui.pethome.dept.domain;

import cn.pengyinrui.pethome.base.domain.BaseDomain;
import cn.pengyinrui.pethome.emp.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class Department extends BaseDomain {
    @ApiParam(value = "部门编号",required = true)
    private String  sn;
    @ApiParam(value = "部门名称",required = true)
    private String  name;
    @ApiParam(value = "",required = true)
    private String  dirPath;
    @ApiParam(value = "部门状态",required = true)
    private Integer state;
    @ApiParam(value = "管理员id",required = true)
    private Long manager_id;
    @ApiParam(value = "上级部门id",required = true)
    private Long parent_id;
    @ApiParam(value = "店铺id",required = true)
    private Long shop_id;


    @ApiParam(value = "管理员信息",required = true)
    private Employee manager;
    @ApiParam(value = "上级部门信息",required = true)
    private Department parent;


    // 无限极树的子类集合
    @JsonInclude(JsonInclude.Include.NON_EMPTY)// 解决空集合
    private List<Department> children = new ArrayList<>();

}
